package model;

import java.util.ArrayList;
import java.util.List;

import util.ParameterCheck;


/**
 * -------  ----------  ---------------  ------  ------  -----------------  --------------  -------------------------------  -----------------------
id       int(11)     (NULL)           NO      PRI     (NULL)             auto_increment  select,insert,update,references                         
itemid   int(11)     (NULL)           YES     MUL     (NULL)                             select,insert,update,references                         
uid      int(11)     (NULL)           YES     MUL     (NULL)                             select,insert,update,references                         
content  text        utf8_general_ci  YES             (NULL)                             select,insert,update,references                         
ctime    timestamp   (NULL)           NO              CURRENT_TIMESTAMP                  select,insert,update,references                         
vote     int(11)     (NULL)           YES     MUL     0                                  select,insert,update,references                         
del      tinyint(1)  (NULL)           YES      
 * @author hyliu
 *
 */
/**
 * @author lchang
 *
 */
public class Comment {
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getItemid() {
		return itemid;
	}

	public void setItemid(int itemid) {
		this.itemid = itemid;
	}

	public int getUid() {
		return uid;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getVote() {
		return vote;
	}

	public void setVote(int vote) {
		this.vote = vote;
	}

	public int getDel() {
		return del;
	}

	public void setDel(int del) {
		this.del = del;
	}

	private int id;
	private int itemid;
	private int uid;
	private String content;
	private int vote;
	private int del;
	private String ctime;
	private String uname;
	
	private List<String> voteuser=new ArrayList<String>();
	private List<String> votetime=new ArrayList<String>();

	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public String getCtime() {
		return ctime;
	}

	public void setCtime(String ctime) {
		this.ctime = ParameterCheck.getTimeFormat(ctime);
	}
	
	public void addVoteUser(String user){
		this.voteuser.add(user);
	}
	public void addVoteTime(String tm){
		this.votetime.add(tm);
	}

	public List<String> getVoteuser() {
		return voteuser;
	}

	public List<String> getVotetime() {
		return votetime;
	}
	
	
}
